<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="static/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="static/css/public.css" media="all">
    <style>
.con_content{
    width: 300px;
    position: relative;
    top: -280px;
    right: -80px;
}
    p{
        width: 300px;
        padding: 5px 0px;
        color: #0e9aef;
    }
strong{
        font-family: 方正粗黑宋简体;
        font-size: 12px;
    }
span{
    font-family: 方正粗黑宋简体;
    font-size: 12px;
    color: #8B91A0;
}
#ljly{
    font-family: 方正粗黑宋简体;
    font-size: 16px;
    color: white;
    text-align: center;
    line-height: 35px;
    width: 161px;
    height: 35px;
    border: 2px black;
    background-color: #ef0e1d;
}
#lxwm{
    font-family: 方正粗黑宋简体;
    font-size: 16px;
    color: white;
    text-align: center;
    line-height: 50px;
    width: 161px;
    height: 50px;
    border: 2px black;
    background-color: #0e9aef;
}
input{
    width: 160px;
    height: 22px;
}
textarea{
    width: 160px;
    height: 100px;
}
.b_title{
    position: absolute;
    top: 150px;
    right: 90px;
}
    </style>
</head>
<body>
<div class="block gray">
    <div class="container-fluid">
        <div class="b_title">
            <div id="lxwm">联系我们</div>
            <span>您的姓名:</span><br>
            <input type="text" name="name" id="one" readonly="readonly"><br>
            <span>您的邮箱:</span><br>
            <input type="text" name="phone" id="tu"><br>
            <span>您的留言:</span><br>
            <textarea name="neirong" id="cly" cols="30" rows="10"></textarea><br>
            <div id="ljly">立即留言</div>
        </div>
        <div class="row">
            <div class="col-md-9 col-sm-12 col-xs-12">
                <div class="contactus">
                    <img src="//sr.91huoke.com/web/wgw/img/wgw2lxwm.jpg?time=1666509784"/>
                    <div class="con_content">
                        <div class="con_name">
                           <strong>VIVO管理后台</strong>
                        </div>
                        <p>
                            企业 :  仿VIVO管理后台
                        </p>
                        <p>
                            联系人 :  张总
                        </p>
                        <p>
                            <span class="wgw2icon icon-neo3"></span>
                            手机 :  15893819332
                        </p>
                        <p>
                            <span class="wgw2icon icon-xingzhuang3"></span>
                            电话 :0187 9999
                        </p>
                        <p>
                            <span class="wgw2icon icon-neo4"></span>
                            传真 :暂无
                        </p>
                        <p>
                            <span class="wgw2icon icon-neo5"></span>
                            邮箱 :2100048952@qq.com
                        </p>
                        <p>
                            <span class="wgw2icon icon-neo6"></span>
                            地址 :河南省
                        </p>
                        <p>
                            <span class="wgw2icon icon-neo7"></span>
                            正品网址 :  https://www.vivo.com.cn/
                        </p>
                    </div>
                </div>
            </div>
            <div class="col-md-3 col-sm-3 hidden-xs">
                <div id="side-buy">
                </div>  <div id="side-message">
            </div>
            </div>
        </div>
    </div>
</div>
<script src="static/js/jquery.min.js?v=2.1.4"></script>
<script>
    var b=sessionStorage.obs;
    $("input[id=one]").val(b.replace(/\"/g, ""));

    $("input[id=tu]").blur(function () {
        let name = $("input[id=tu]").val();
        var ePattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
        if (ePattern.test(name) != true && (name != null && name != "")) {
            alert("邮箱格式输入错误");
        }
    })
    $("#ljly").click(function () {
       let a=$("input[id=one]").val();
        let b=$("input[id=tu]").val();
        let c=$("#cly").val();
       if (a==null||a==""){
           return alert("您的姓名不能为空哦");
       }else if (b==null||b==""){
           return alert("您的邮箱不能为空哦");
       }else if (c==null||c==""){
           return alert("您的留言不能为空哦");
    }
let name=$("#one").val();
        let phone=$("#tu").val();
        let neirong=$("#cly").val();
        $.ajax({
            "url": "gly?opr=glyly&name='" + name + "'&phone='" + phone + "'&neirong='" + neirong + "'",
            "dataType": 'text',
            "type": 'post',
            async: false,
            "success": function (date) {
                top.window['upd'].frames.location.reload();
                if (date == "true") {
                   alert("留言成功 哦耶");
                 $("#tu").val("");
              $("#cly").val("");
                    let b=sessionStorage.obs;
                    let a=b.replace(/\"/g, "");
                    let cz="联系我们";
                    let gn="留言";
                    let jg="成功";
                    $.ajax({
                        "url": "gly?opr=xmr",
                        "data": {name:a,cz:cz,gn:gn,jg:jg}
                    })
                } else {
                    alert("留言失败 不哦耶");
                    let b=sessionStorage.obs;
                    let a=b.replace(/\"/g, "");
                    let cz="联系我们";
                    let gn="留言";
                    let jg="失败";
                    $.ajax({
                        "url": "gly?opr=xmr",
                        "data": {name:a,cz:cz,gn:gn,jg:jg}
                    })
                }
            }
        });


    })
</script>
</body>
</html>